Hi everyone,
I just created a dialogbox but it looks like something missing in my code and I can't find the missing pieces :( Can anyone please correct my code? Thanks in advance.
void main(){
dialogbox = create("Copy all selected view from source to target module", styleCentered | styleFixed)
source_mod_Frame = frame(dialogbox, "Select source module:", 450, 14)
source_mod_Frame -> "right" -> "unattached"
source_mod_DBE = listView(dialogbox, listViewOptionSortText, 400, 12, dummyArray)
source_mod_DBE -> "top" -> "inside" -> source_mod_Frame
source_mod_DBE -> "left" -> "inside" -> source_mod_Frame
source_mod_DBE -> "right" -> "inside" -> source_mod_Frame
source_mod_DBE -> "bottom" -> "inside" -> source_mod_Frame
view_Frame = frame(dialogbox, "Select Views to copy:", 250, 14)
view_Frame -> "left" -> "unattached"
view_Frame -> "top" -> "aligned" -> source_mod_Frame
view_DBE = listView(dialogbox, listViewOptionMultiselect, 200, 12, dummyArray)
view_DBE -> "top" -> "inside" -> view_Frame
view_DBE -> "left" -> "inside" -> view_Frame
view_DBE -> "right" -> "inside" -> view_Frame
view_DBE -> "bottom" -> "inside" -> view_Frame
splitDBE = splitter(dialogbox, source_mod_Frame, view_Frame, 3)
splitDBE -> "top" -> "form"
splitDBE -> "left" -> "unattached"
splitDBE -> "right" -> "unattached"
splitDBE -> "bottom" -> "form"
target_mod_Frame = frame(dialogbox, "Select target modules: ", 450, 14)
target_mod_Frame -> "right" -> "unattached"
target_mod_Frame -> "left" -> "spaced" -> view_Frame
target_mod_Frame -> "top" -> "aligned" -> view_Frame
target_mod_DBE = listView(dialogbox, listViewOptionSortText, 400, 12, dummyArray)
target_mod_DBE -> "top" -> "inside" -> target_mod_Frame
target_mod_DBE -> "left" -> "inside" -> target_mod_Frame
target_mod_DBE -> "right" -> "inside" -> target_mod_Frame
target_mod_DBE -> "bottom" -> "inside" -> target_mod_Frame
splitDBE_2 = splitter(dialogbox, view_Frame, target_mod_Frame, 3)
splitDBE_2 -> "top" -> "form"
splitDBE_2 -> "left" -> "unattached"
splitDBE_2 -> "right" -> "unattached"
splitDBE_2 -> "bottom" -> "form"
copyView = apply(dialogbox, "Copy Views", copy_Views)
freshButton = apply(dialogbox, "Refresh", refresh)
realize dialogbox
insertColumn(source_mod_DBE, 0, "Source module full name: ", 400, iconDatabase)
insertColumn(view_DBE, 0, "Views: ", 200, iconNone)
insertColumn(target_mod_DBE, 0, "Target module full name: ", 400, iconDatabase)
//setSortColumn(view_DBE, 0)
show dialogbox
}
Jonny Tim - Mon Mar 04 08:20:37 EST 2019 |
|
Re: DB auto sizing Jonny Tim - Mon Mar 04 08:24:40 EST 2019
|
|
Re: DB auto sizing llandale - Mon Mar 04 17:41:14 EST 2019
You didn't mention what you were trying to do and why it failed, but I wrote the following that allows you to resize your frames.
I think the "styleFixed" was a big culprit.
I've never used a splitter before. Odd that you must define the 2nd DBE on the right before you insert the splitter before it.
The "separator" at the bottom got the apply buttons to display correctly. It might not have been needed once I fixed some of the "bottom" connections in the various elements.
The "beside" and "left" commands are not really needed since you are specifically deciding left/right/top/bottom connections, but it helps me keep things straight when eye-balling the code without actually reading it.
Try to keep your code visually "cleaner" with things lining up (such as the "->" arrows); its a lot easier to read that way.
-Louie
string dummyArray[]
DB dialogBox
DBE source_mod_Frame, source_mod_DBE, view_Frame, view_DBE, target_mod_Frame, target_mod_DBE
DBE splitDBE_1, splitDBE_2, sepDBE
void copy_Views(DB dbXX)
{}
void refresh(DB dbXX)
{}
void main(){
dialogbox = create("Copy all selected view from source to target module", styleCentered) // NOT FIXED
source_mod_Frame = frame(dialogbox, "Select source module:", 450, 14)
source_mod_Frame -> "top" -> "form"
source_mod_Frame -> "left" -> "form"
source_mod_Frame -> "right" -> "unattached"
source_mod_Frame -> "bottom" -> "form"
source_mod_DBE = listView(dialogbox, listViewOptionSortText, 400, 12, dummyArray)
source_mod_DBE -> "top" -> "inside" -> source_mod_Frame
source_mod_DBE -> "left" -> "inside" -> source_mod_Frame
source_mod_DBE -> "right" -> "inside" -> source_mod_Frame
source_mod_DBE -> "bottom" -> "inside" -> source_mod_Frame
beside dialogbox // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
view_Frame = frame(dialogbox, "Select Views to copy:", 250, 14)
view_Frame -> "top" -> "aligned" -> source_mod_Frame
view_Frame -> "left" -> "spaced" -> source_mod_Frame
view_Frame -> "right" -> "unattached"
view_Frame -> "bottom" ->"form"
view_DBE = listView(dialogbox, listViewOptionMultiselect, 200, 12, dummyArray)
view_DBE -> "top" -> "inside" -> view_Frame
view_DBE -> "left" -> "inside" -> view_Frame
view_DBE -> "right" -> "inside" -> view_Frame
view_DBE -> "bottom" -> "inside" -> view_Frame
target_mod_Frame = frame(dialogbox, "Select target modules: ", 450, 14)
target_mod_Frame -> "top" -> "aligned" -> view_Frame
target_mod_Frame -> "left" -> "spaced" -> view_Frame
target_mod_Frame -> "right" -> "form"
target_mod_Frame -> "bottom" -> "form"
target_mod_DBE = listView(dialogbox, listViewOptionSortText, 400, 12, dummyArray)
target_mod_DBE -> "top" -> "inside" -> target_mod_Frame
target_mod_DBE -> "left" -> "inside" -> target_mod_Frame
target_mod_DBE -> "right" -> "inside" -> target_mod_Frame
target_mod_DBE -> "bottom" -> "inside" -> target_mod_Frame
splitDBE_1 = splitter(dialogbox, source_mod_Frame, view_Frame, 3)
splitDBE_1 -> "top" -> "form"
splitDBE_1 -> "bottom" -> "form"
splitDBE_2 = splitter(dialogbox, view_Frame, target_mod_Frame, 3)
splitDBE_2 -> "top" -> "form"
splitDBE_2 -> "bottom" -> "form"
left(dialogbox) //<<<<<<<<<<<<<<<<<<<<<<<<<<<
sepDBE = separator(dialogbox) //---------------------------
sepDBE ->"top" ->"flush" ->target_mod_DBE
copyView = apply(dialogbox, "Copy Views", copy_Views)
freshButton = apply(dialogbox, "Refresh", refresh)
realize dialogbox
insertColumn(source_mod_DBE, 0, "Source module full name: ", 400, iconDatabase)
insertColumn(view_DBE, 0, "Views: ", 200, iconNone)
insertColumn(target_mod_DBE, 0, "Target module full name: ", 400, iconDatabase)
//setSortColumn(view_DBE, 0)
show dialogbox
}
main
|
|
Re: DB auto sizing Jonny Tim - Mon Mar 18 06:33:12 EDT 2019 llandale - Mon Mar 04 17:41:14 EST 2019
You didn't mention what you were trying to do and why it failed, but I wrote the following that allows you to resize your frames.
I think the "styleFixed" was a big culprit.
I've never used a splitter before. Odd that you must define the 2nd DBE on the right before you insert the splitter before it.
The "separator" at the bottom got the apply buttons to display correctly. It might not have been needed once I fixed some of the "bottom" connections in the various elements.
The "beside" and "left" commands are not really needed since you are specifically deciding left/right/top/bottom connections, but it helps me keep things straight when eye-balling the code without actually reading it.
Try to keep your code visually "cleaner" with things lining up (such as the "->" arrows); its a lot easier to read that way.
-Louie
string dummyArray[]
DB dialogBox
DBE source_mod_Frame, source_mod_DBE, view_Frame, view_DBE, target_mod_Frame, target_mod_DBE
DBE splitDBE_1, splitDBE_2, sepDBE
void copy_Views(DB dbXX)
{}
void refresh(DB dbXX)
{}
void main(){
dialogbox = create("Copy all selected view from source to target module", styleCentered) // NOT FIXED
source_mod_Frame = frame(dialogbox, "Select source module:", 450, 14)
source_mod_Frame -> "top" -> "form"
source_mod_Frame -> "left" -> "form"
source_mod_Frame -> "right" -> "unattached"
source_mod_Frame -> "bottom" -> "form"
source_mod_DBE = listView(dialogbox, listViewOptionSortText, 400, 12, dummyArray)
source_mod_DBE -> "top" -> "inside" -> source_mod_Frame
source_mod_DBE -> "left" -> "inside" -> source_mod_Frame
source_mod_DBE -> "right" -> "inside" -> source_mod_Frame
source_mod_DBE -> "bottom" -> "inside" -> source_mod_Frame
beside dialogbox // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
view_Frame = frame(dialogbox, "Select Views to copy:", 250, 14)
view_Frame -> "top" -> "aligned" -> source_mod_Frame
view_Frame -> "left" -> "spaced" -> source_mod_Frame
view_Frame -> "right" -> "unattached"
view_Frame -> "bottom" ->"form"
view_DBE = listView(dialogbox, listViewOptionMultiselect, 200, 12, dummyArray)
view_DBE -> "top" -> "inside" -> view_Frame
view_DBE -> "left" -> "inside" -> view_Frame
view_DBE -> "right" -> "inside" -> view_Frame
view_DBE -> "bottom" -> "inside" -> view_Frame
target_mod_Frame = frame(dialogbox, "Select target modules: ", 450, 14)
target_mod_Frame -> "top" -> "aligned" -> view_Frame
target_mod_Frame -> "left" -> "spaced" -> view_Frame
target_mod_Frame -> "right" -> "form"
target_mod_Frame -> "bottom" -> "form"
target_mod_DBE = listView(dialogbox, listViewOptionSortText, 400, 12, dummyArray)
target_mod_DBE -> "top" -> "inside" -> target_mod_Frame
target_mod_DBE -> "left" -> "inside" -> target_mod_Frame
target_mod_DBE -> "right" -> "inside" -> target_mod_Frame
target_mod_DBE -> "bottom" -> "inside" -> target_mod_Frame
splitDBE_1 = splitter(dialogbox, source_mod_Frame, view_Frame, 3)
splitDBE_1 -> "top" -> "form"
splitDBE_1 -> "bottom" -> "form"
splitDBE_2 = splitter(dialogbox, view_Frame, target_mod_Frame, 3)
splitDBE_2 -> "top" -> "form"
splitDBE_2 -> "bottom" -> "form"
left(dialogbox) //<<<<<<<<<<<<<<<<<<<<<<<<<<<
sepDBE = separator(dialogbox) //---------------------------
sepDBE ->"top" ->"flush" ->target_mod_DBE
copyView = apply(dialogbox, "Copy Views", copy_Views)
freshButton = apply(dialogbox, "Refresh", refresh)
realize dialogbox
insertColumn(source_mod_DBE, 0, "Source module full name: ", 400, iconDatabase)
insertColumn(view_DBE, 0, "Views: ", 200, iconNone)
insertColumn(target_mod_DBE, 0, "Target module full name: ", 400, iconDatabase)
//setSortColumn(view_DBE, 0)
show dialogbox
}
main
Sorry for the inconvenience. It becauses the editor of forum. I have tried more than 3 times but it didn't change anythings.
Anyways, thank you very much.
|
|